from Base import message, intersect, SS_VALID
from DRG import MDCG_DRG

def group(record):
  adrg_zd = []
  adrg_zd1 = []
  adrg_ss = ["42.3303","42.3305","43.4107","44.3201","44.9901","45.3004","45.3007","46.3201","46.8501","46.8502","46.8503","46.8505","46.8506","46.8507","46.8508","46.8509","42.3307","42.3308","42.3309","43.4100x020","43.4100x021","43.4100x024","43.4100x025","43.4106","43.4109","43.4110","44.2200x004","45.3000x005","45.3000x006","45.3000x007","45.3003","45.3400x002","45.3400x003","45.3400x004","45.3400x006","45.3400x007","45.3400x008","45.4300x009","45.4300x012","45.4300x013","45.4300x015","45.4300x016","45.4300x017","46.8500x005","46.8500x008","46.8500x009","46.8510","48.3600x001","48.3600x003","48.3600x004","48.3600x005","48.3600x006","48.3600x009","48.3600x010","48.3600x011"]
  adrg_ss1 = []
  dept_list = []

  if True and record.ssList and record.ssList[0] in adrg_ss:
    message('符合GK1入组条件，匹配规则：主手术匹配')

    if MDCG_DRG.GK19_group(record):
      return 'GK19'
        
    return 'GK1'
  else:
    return ''
    
